package com.cfpl.project_common.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName dealer
 */
@TableName(value ="dealer")
@Data
public class Dealer implements Serializable {
    /**
     * 经销商社会信用代码
     */
    private String id;

    /**
     * 经销商名称
     */
    private String dealerName;

    /**
     * 联系方式 电话
     */
    private String phone;

    /**
     * 联系方式 邮件
     */
    private String email;

    /**
     * 经销商地址
     */
    private String address;

    /**
     * 加入时间
     */
    private Long joinTime;

    /**
     * 顶级区域代码
     */
    private String topRegionCode;

    /**
     * 二级区域代码
     */
    private String secondRegionCode;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Dealer other = (Dealer) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDealerName() == null ? other.getDealerName() == null : this.getDealerName().equals(other.getDealerName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getJoinTime() == null ? other.getJoinTime() == null : this.getJoinTime().equals(other.getJoinTime()))
            && (this.getTopRegionCode() == null ? other.getTopRegionCode() == null : this.getTopRegionCode().equals(other.getTopRegionCode()))
            && (this.getSecondRegionCode() == null ? other.getSecondRegionCode() == null : this.getSecondRegionCode().equals(other.getSecondRegionCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDealerName() == null) ? 0 : getDealerName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getJoinTime() == null) ? 0 : getJoinTime().hashCode());
        result = prime * result + ((getTopRegionCode() == null) ? 0 : getTopRegionCode().hashCode());
        result = prime * result + ((getSecondRegionCode() == null) ? 0 : getSecondRegionCode().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", dealerName=").append(dealerName);
        sb.append(", phone=").append(phone);
        sb.append(", email=").append(email);
        sb.append(", address=").append(address);
        sb.append(", joinTime=").append(joinTime);
        sb.append(", topRegionCode=").append(topRegionCode);
        sb.append(", secondRegionCode=").append(secondRegionCode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}